<template>
  <div class="home">
    <!-- 欢迎横幅 -->
    <div class="welcome-banner">
      <div class="banner-content">
        <h1 class="banner-title">欢迎使用学生管理系统</h1>
        <p class="banner-subtitle">高效管理学生和教师信息，提升教育管理效率</p>
        <div class="banner-stats">
          <div class="stat-item" data-aos="fade-up" data-aos-delay="200">
            <span class="stat-number">{{ studentCount }}</span>
            <span class="stat-label">学生</span>
          </div>
          <div v-if="role === 'admin' || role === 'teacher'" class="stat-divider"></div>
          <div v-if="role === 'admin' || role === 'teacher'" class="stat-item" data-aos="fade-up" data-aos-delay="400">
            <span class="stat-number">{{ teacherCount }}</span>
            <span class="stat-label">教师</span>
          </div>
        </div>
      </div>
      <div class="banner-decoration">
        <div class="floating-shapes">
          <div class="shape shape-1"></div>
          <div class="shape shape-2"></div>
          <div class="shape shape-3"></div>
          <div class="shape shape-4"></div>
          <div class="shape shape-5"></div>
        </div>
      </div>
    </div>

    <!-- 统计卡片 -->
    <div class="stats-section">
      <el-row :gutter="24">
        <el-col :span="role === 'admin' ? 8 : 12">
          <div class="stat-card student-card" @click="$router.push('/dashboard/student')">
            <div class="card-content">
              <div class="icon-wrapper">
                <el-icon class="stat-icon"><User /></el-icon>
              </div>
              <div class="stat-details">
                <div class="stat-number">{{ studentCount }}</div>
                <div class="stat-title">学生总数</div>
                <div class="stat-desc">点击查看学生管理</div>
              </div>
              <div class="card-arrow">
                <el-icon><ArrowRight /></el-icon>
              </div>
            </div>
            <div class="card-bg"></div>
          </div>
        </el-col>
        
        <el-col v-if="role === 'admin' || role === 'teacher'" :span="role === 'admin' ? 8 : 12">
          <div class="stat-card teacher-card" @click="$router.push('/dashboard/teacher')">
            <div class="card-content">
              <div class="icon-wrapper">
                <el-icon class="stat-icon"><Avatar /></el-icon>
              </div>
              <div class="stat-details">
                <div class="stat-number">{{ teacherCount }}</div>
                <div class="stat-title">教师总数</div>
                <div class="stat-desc">点击查看教师管理</div>
              </div>
              <div class="card-arrow">
                <el-icon><ArrowRight /></el-icon>
              </div>
            </div>
            <div class="card-bg"></div>
          </div>
        </el-col>
        
        <el-col :span="8">
          <div class="stat-card system-card">
            <div class="card-content">
              <div class="icon-wrapper">
                <el-icon class="stat-icon"><Setting /></el-icon>
              </div>
              <div class="stat-details">
                <div class="stat-number">100%</div>
                <div class="stat-title">系统状态</div>
                <div class="stat-desc">运行正常</div>
              </div>
              <div class="status-indicator">
                <div class="status-dot"></div>
              </div>
            </div>
            <div class="card-bg"></div>
          </div>
        </el-col>
      </el-row>
    </div>

    <!-- 功能区域 -->
    <div class="features-section">
      <el-row :gutter="24">
        <el-col :span="24">
          <el-card class="feature-card">
            <template #header>
              <div class="card-header">
                <el-icon><Grid /></el-icon>
                <span>快速功能</span>
              </div>
            </template>
            <div class="feature-grid">
              <div class="feature-item" @click="$router.push('/dashboard/student')">
                <div class="feature-icon">
                  <el-icon><User /></el-icon>
                </div>
                <div class="feature-content">
                  <h4>学生管理</h4>
                  <p>管理学生信息、成绩和档案</p>
                </div>
                <div class="feature-arrow">
                  <el-icon><ArrowRight /></el-icon>
                </div>
              </div>
              
              <div v-if="role === 'admin' || role === 'teacher'" class="feature-item" @click="$router.push('/dashboard/teacher')">
                <div class="feature-icon">
                  <el-icon><Avatar /></el-icon>
                </div>
                <div class="feature-content">
                  <h4>教师管理</h4>
                  <p>管理教师信息和课程安排</p>
                </div>
                <div class="feature-arrow">
                  <el-icon><ArrowRight /></el-icon>
                </div>
              </div>
            </div>
          </el-card>
        </el-col>
      </el-row>
      <el-row :gutter="24" style="margin-top: 24px;">
        <el-col :span="24">
          <el-card class="feature-card">
            <template #header>
              <div class="card-header">
                <el-icon><InfoFilled /></el-icon>
                <span>系统简介</span>
              </div>
            </template>
            <div class="system-introduction">
              <p>本系统旨在提供一个全面、高效的学生管理解决方案，涵盖学生信息、成绩、教师管理等多个方面。通过直观的用户界面和强大的功能，帮助教育机构提升管理效率，优化教学资源配置。</p>
              <p>主要功能包括：</p>
              <ul>
                <li>学生信息管理：录入、查询、修改学生基本信息。</li>
                <li>成绩管理：录入、查询、分析学生各科目成绩。</li>
                <li>教师信息管理：管理教师基本信息和课程分配。</li>
                <li>用户权限管理：灵活配置不同角色的操作权限（仅管理员可见）。</li>
              </ul>
              <p>系统致力于简化日常管理工作，让教育者能够更专注于教学本身。</p>
            </div>
          </el-card>
        </el-col>
        
        <el-col v-if="role === 'admin'" :span="8">
          <el-card class="activity-card">
            <template #header>
              <div class="card-header">
                <el-icon><Bell /></el-icon>
                <span>系统动态</span>
              </div>
            </template>
            <div class="activity-timeline">
              <div class="timeline-item">
                <div class="timeline-dot success"></div>
                <div class="timeline-content">
                  <div class="timeline-title">系统启动成功</div>
                  <div class="timeline-time">刚刚</div>
                </div>
              </div>
              
              <div class="timeline-item">
                <div class="timeline-dot info"></div>
                <div class="timeline-content">
                  <div class="timeline-title">欢迎使用学生管理系统</div>
                  <div class="timeline-time">1分钟前</div>
                </div>
              </div>
              
              <div class="timeline-item">
                <div class="timeline-dot warning"></div>
                <div class="timeline-content">
                  <div class="timeline-title">数据库连接正常</div>
                  <div class="timeline-time">2分钟前</div>
                </div>
              </div>
              
              <div class="timeline-item">
                <div class="timeline-dot primary"></div>
                <div class="timeline-content">
                  <div class="timeline-title">用户登录成功</div>
                  <div class="timeline-time">3分钟前</div>
                </div>
              </div>
            </div>
          </el-card>
        </el-col>
      </el-row>

      <!-- 权限控制面板（仅管理员可见） -->
      <el-row v-if="role === 'admin'" :gutter="24" style="margin-top: 24px;">
        <el-col :span="24">
          <el-card class="feature-card permission-card">
            <template #header>
              <div class="card-header">
                <el-icon><Lock /></el-icon>
                <span>权限控制面板</span>
              </div>
            </template>
            <div class="permission-controls">
              <div class="permission-group">
                <div class="permission-title">学生端权限</div>
                <div class="permission-switches">
                  <el-switch
                    v-model="permissions.studentEdit"
                    :loading="updating"
                    @change="updatePermission('student', 'edit')"
                    active-text="允许修改个人信息"
                  />
                  <el-switch
                    v-model="permissions.studentScore"
                    :loading="updating"
                    @change="updatePermission('student', 'score')"
                    active-text="允许查看成绩"
                  />
                </div>
              </div>
              <el-divider />
              <div class="permission-group">
                <div class="permission-title">教师端权限</div>
                <div class="permission-switches">
                  <el-switch
                    v-model="permissions.teacherEdit"
                    :loading="updating"
                    @change="updatePermission('teacher', 'edit')"
                    active-text="允许修改个人信息"
                  />
                  <el-switch
                    v-model="permissions.teacherScore"
                    :loading="updating"
                    @change="updatePermission('teacher', 'score')"
                    active-text="允许修改学生成绩"
                  />
                  <el-switch
                    v-model="permissions.teacherAdmin"
                    :loading="updating"
                    @change="updatePermission('teacher', 'admin')"
                    active-text="允许教师使用管理员功能"
                  />
                </div>
              </div>
            </div>
          </el-card>
        </el-col>
      </el-row>
    </div>

    <!-- 系统信息 -->
    <div class="system-info">
      <el-card class="info-card">
        <div class="info-content">
          <div class="info-item">
            <el-icon><Clock /></el-icon>
            <span>当前时间：{{ currentTime }}</span>
          </div>
          <div class="info-item">
            <el-icon><Monitor /></el-icon>
            <span>系统版本：v1.0.0</span>
          </div>
          <div class="info-item">
            <el-icon><Connection /></el-icon>
            <span>在线状态：正常</span>
          </div>
        </div>
      </el-card>
    </div>
  </div>
</template>

<script>
import { ref, onMounted, onUnmounted } from 'vue'
import axios from 'axios'
import { ElMessage } from 'element-plus'

export default {
  name: 'Home',
  setup() {
    const studentCount = ref(0)
    const teacherCount = ref(0)
    const currentTime = ref('')
    const role = ref(localStorage.getItem('role') || 'student')
    const updating = ref(false)
    const permissions = ref({
      studentEdit: true,
      studentScore: true,
      teacherEdit: true,
      teacherScore: true,
      teacherAdmin: true
    })
    let timeInterval = null

    // 获取权限设置
    const fetchPermissions = async () => {
      try {
        const response = await axios.get('/api/admin/permissions')
        if (response.data.code === 1) {
          permissions.value = response.data.data
        }
      } catch (error) {
        console.error('获取权限设置失败:', error)
        ElMessage.error('获取权限设置失败')
      }
    }

    // 更新权限设置
    const updatePermission = async (role, type) => {
      updating.value = true
      try {
        const response = await axios.post('/api/admin/permissions/update', {
          role,
          type,
          value: permissions.value[`${role}${type.charAt(0).toUpperCase() + type.slice(1)}`]
        })
        if (response.data.code === 1) {
          ElMessage.success('权限更新成功')
        } else {
          ElMessage.error(response.data.msg || '权限更新失败')
          // 恢复原值
          permissions.value[`${role}${type.charAt(0).toUpperCase() + type.slice(1)}`] = !permissions.value[`${role}${type.charAt(0).toUpperCase() + type.slice(1)}`]
        }
      } catch (error) {
        console.error('更新权限失败:', error)
        ElMessage.error('更新权限失败')
        // 恢复原值
        permissions.value[`${role}${type.charAt(0).toUpperCase() + type.slice(1)}`] = !permissions.value[`${role}${type.charAt(0).toUpperCase() + type.slice(1)}`]
      } finally {
        updating.value = false
      }
    }

    const fetchCounts = async () => {
      try {
        // 获取学生总数
        const studentResponse = await axios.get('/api/student/list')
        if (studentResponse.data.code === 1) {
          studentCount.value = studentResponse.data.data.length
        }
        
        // 获取教师总数
        const teacherResponse = await axios.get('/api/teacher/listAll')
        if (teacherResponse.data.code === 1) {
          teacherCount.value = teacherResponse.data.data.length
        }
      } catch (error) {
        console.error('获取统计数据失败:', error)
      }
    }

    const updateTime = () => {
      const now = new Date()
      currentTime.value = now.toLocaleString('zh-CN', {
        year: 'numeric',
        month: '2-digit',
        day: '2-digit',
        hour: '2-digit',
        minute: '2-digit',
        second: '2-digit'
      })
    }

    onMounted(() => {
      fetchCounts()
      updateTime()
      timeInterval = setInterval(updateTime, 1000)
      if (role.value === 'admin') {
        fetchPermissions()
      }
    })

    onUnmounted(() => {
      if (timeInterval) {
        clearInterval(timeInterval)
      }
    })

    return {
      studentCount,
      teacherCount,
      currentTime,
      role,
      permissions,
      updating,
      updatePermission
    }
  }
}
</script>

<style scoped>
.home {
  padding: 24px;
  background: linear-gradient(135deg, #fafdff 0%, #e3eafc 100%);
  min-height: calc(100vh - 120px);
}

/* 欢迎横幅 */
.welcome-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: 24px;
  padding: 60px 40px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  color: white;
  box-shadow: 0 25px 50px rgba(102, 126, 234, 0.25);
  min-height: 280px;
  display: flex;
  align-items: center;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.banner-content {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 700px;
}

.banner-title {
  font-size: 3.2rem;
  font-weight: 800;
  margin: 0 0 16px 0;
  text-shadow: 0 4px 12px rgba(0,0,0,0.15);
  line-height: 1.1;
  background: linear-gradient(45deg, #fff, #e3f2fd);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: slideInLeft 1s ease-out;
}

.banner-subtitle {
  font-size: 1.3rem;
  margin: 0 0 40px 0;
  opacity: 0.95;
  font-weight: 400;
  line-height: 1.6;
  animation: slideInLeft 1s ease-out 0.2s both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.banner-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  animation: slideInLeft 1s ease-out 0.4s both;
}

.stat-item {
  text-align: center;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.stat-item:hover {
  transform: translateY(-8px) scale(1.05);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.stat-number {
  display: block;
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.4), transparent);
  margin: 0 16px;
}

/* 浮动装饰 */
.banner-decoration {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.floating-shapes {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 8s ease-in-out infinite;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 15%;
  right: 15%;
  animation-delay: 0s;
  background: rgba(255, 255, 255, 0.12);
}

.shape-2 {
  width: 120px;
  height: 120px;
  top: 55%;
  right: 8%;
  animation-delay: 2s;
  background: rgba(255, 255, 255, 0.08);
}

.shape-3 {
  width: 60px;
  height: 60px;
  top: 35%;
  right: 35%;
  animation-delay: 4s;
  background: rgba(255, 255, 255, 0.15);
}

.shape-4 {
  width: 40px;
  height: 40px;
  top: 8%;
  right: 45%;
  animation-delay: 1s;
  background: rgba(255, 193, 7, 0.25);
}

.shape-5 {
  width: 100px;
  height: 100px;
  top: 70%;
  right: 55%;
  animation-delay: 3s;
  background: rgba(76, 175, 80, 0.2);
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% { 
    transform: translateY(-15px) rotate(90deg) scale(1.1);
    opacity: 0.8;
  }
  50% { 
    transform: translateY(-25px) rotate(180deg) scale(0.9);
    opacity: 1;
  }
  75% { 
    transform: translateY(-10px) rotate(270deg) scale(1.05);
    opacity: 0.7;
  }
}

/* 统计卡片 */
.stats-section {
  margin-bottom: 32px;
}

.stat-card {
  position: relative;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 24px 64px rgba(64, 158, 255, 0.18);
  filter: brightness(1.04);
}

.card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 24px;
  display: flex;
  align-items: center;
  color: white;
}

.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.student-card .card-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.teacher-card .card-bg {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.system-card .card-bg {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  backdrop-filter: blur(10px);
}

.stat-icon {
  font-size: 28px;
  color: white;
}

.stat-details {
  flex: 1;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1;
}

.stat-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 0.9rem;
  opacity: 0.8;
}

.card-arrow {
  opacity: 0;
  transition: all 0.3s ease;
  transform: translateX(-10px);
}

.stat-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.status-indicator {
  display: flex;
  align-items: center;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #67c23a;
  box-shadow: 0 0 0 4px rgba(103, 194, 58, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(103, 194, 58, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(103, 194, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(103, 194, 58, 0); }
}

/* 功能区域 */
.features-section {
  margin-bottom: 32px;
}

.feature-card {
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(64, 158, 255, 0.10);
  border: none;
  background: linear-gradient(135deg, #fafdff 0%, #e3eafc 100%);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #303133;
  padding: 12px 16px;
}

.card-header .el-icon {
  color: #409EFF;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.feature-item:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(64, 158, 255, 0.2);
  border-color: #409EFF;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #409EFF 0%, #36a3f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  color: white;
  font-size: 20px;
}

.feature-content {
  flex: 1;
}

.feature-content h4 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #303133;
}

.feature-content p {
  margin: 0;
  font-size: 0.9rem;
  color: #606266;
}

.feature-arrow {
  color: #409EFF;
  opacity: 0;
  transition: all 0.3s ease;
  transform: translateX(-10px);
}

.feature-item:hover .feature-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* 活动卡片 */
.activity-card {
  border-radius: 22px;
  box-shadow: 0 2px 16px rgba(64, 158, 255, 0.07);
  border: none;
  height: 100%;
  background: rgba(255,255,255,0.97);
  transition: box-shadow 0.3s;
  padding: 0 16px;
}
.activity-card:hover {
  box-shadow: 0 16px 48px rgba(64, 158, 255, 0.16);
}

.activity-timeline {
  position: relative;
  padding: 2px 0 0 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  padding: 3px 0;
  position: relative;
  min-height: 20px;
  margin-left: 2px;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 0;
  width: 1px;
  background: #e4e7ed;
  opacity: 0.5;
}

.timeline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  margin-top: 3px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(64,158,255,0.04);
}

.timeline-dot.success { background: #67c23a; }
.timeline-dot.info { background: #409EFF; }
.timeline-dot.warning { background: #e6a23c; }
.timeline-dot.primary { background: #909399; }

.timeline-content {
  flex: 1;
  text-align: left;
  padding-left: 0;
  margin-top: 1px;
}

.timeline-title {
  font-weight: 500;
  color: #2d3a4b;
  margin-bottom: 0px;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.timeline-time {
  font-size: 0.78rem;
  color: #b0b8c9;
  margin-bottom: 0;
}

/* 系统信息 */
.system-info {
  margin-top: 32px;
}

.info-card {
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(64, 158, 255, 0.08);
  border: none;
  background: rgba(255,255,255,0.88);
}

.info-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 26px 0 18px 0;
  gap: 60px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4b587c;
  font-size: 1.03rem;
  letter-spacing: 0.01em;
}

.info-item .el-icon {
  color: #409EFF;
  font-size: 18px;
}

/* 权限控制面板 */
.permission-card {
  margin-bottom: 24px;
}

.permission-controls {
  padding: 16px;
}

.permission-group {
  margin-bottom: 24px;
}

.permission-group:last-child {
  margin-bottom: 0;
}

.permission-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3a4b;
  margin-bottom: 16px;
}

.permission-switches {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.permission-switches .el-switch {
  margin-right: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .home {
    padding: 10px;
  }
  .welcome-banner {
    padding: 16px;
  }
  .banner-content h1 {
    font-size: 1.3rem;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .info-content {
    flex-direction: column;
    gap: 12px;
  }
  .banner-stats {
    flex-direction: column;
    gap: 10px;
  }
  .stat-divider {
    width: 40px;
    height: 1px;
  }
}
</style>
